﻿#pragma once

// Avoid warning when explicitly mentioning enum name
#pragma warning (disable : 4482)

// See http://www.cplusplus.com/forum/general/2949/
#define stringify( name ) # name

/// <written by="Steve Stanton" on="17-NOV-2011"/>
/// <summary>
/// Numeric values that are used to identify the various data fields involved in
/// the definition of edits.
/// </summary>
/// <remarks>
/// These values are used to help avoid potential typos that might not get caught until
/// run-time. As things currently stand, these values do not get persisted, so you can
/// re-arrange them as you please. This may need to change if a binary writer is provided.</remarks>

// Workaround - If any of the DataField values clash with something else (e.g. stuff picked up
// through stdafx), you can rename it to something else... but leave the corresponding element
// in DataFields as it was. As a matter of convention, it's probably best just to rename by
// pre-pending the DataField value with an underscore (e.g. see _Arc).

enum DataField
{
    DataField_Empty = 0,
    DataField_X,
    DataField_Y,
    DataField_Z,
    DataField_Id,
	DataField_Ids,
    DataField_Point,
    DataField_Points,
    DataField_NewPoint,
    DataField_Line,
    DataField_Line1,
    DataField_Line2,
    DataField_Lines,
    DataField_NewLine,
    DataField_NewLine1,
    DataField_NewLine2,
    DataField_Text,
    DataField_Length,
    DataField_Features,
    DataField_Result,
    DataField_Test,
    DataField_Offset,
    DataField_Face,
    DataField_OtherSide,
    DataField_Type,
    DataField_Radius,
    DataField_Direction,
    DataField_Direction1,
    DataField_Direction2,
    DataField_Edit,
    DataField_Distance,
    DataField_Distance1,
    DataField_Distance2,
    DataField_From,
    DataField_To,
    DataField_DirLine,
    DataField_DistLine,
    DataField_ForeignKey,
    DataField_Key,
    DataField_Arc,
    DataField_ClosingPoint,
    DataField_Topological,
    DataField_Left,
    DataField_PolygonX,
    DataField_PolygonY,
    DataField_PositionRatio,
    DataField_Center,
    DataField_CloseTo,
    DataField_SplitAfter,
    DataField_SplitAfter1,
    DataField_SplitAfter2,
    DataField_SplitBefore,
    DataField_SplitBefore1,
    DataField_SplitBefore2,
    DataField_Default,
    DataField_From1,
    DataField_From2,
    DataField_RefLine,
    DataField_ReverseArc,
    DataField_Term1,
    DataField_Term2,
    DataField_DeactivatedLabel,
    DataField_End,
    DataField_Entity,
    DataField_EntryString,
    DataField_FirstArc,
    DataField_Flipped,
    DataField_Label,
    DataField_NewX,
    DataField_NewY,
    DataField_OldX,
    DataField_OldY,
    DataField_RevisedEdit,
    DataField_RevisedEdits,
    DataField_Value,
    DataField_Start,
    DataField_Table,
    DataField_Template,
    DataField_Width,
    DataField_Backsight,
    DataField_Base,
    DataField_Clockwise,
    DataField_Data,
    DataField_DefaultEntryUnit,
    DataField_Delete,
    DataField_Font,
    DataField_Height,
    DataField_OldPolygonX,
    DataField_OldPolygonY,
    DataField_Rotation,
    DataField_EntryFromEnd,
    DataField_ExtendFromEnd,
    DataField_Fixed,
    DataField_Unit,
    DataField_UpdatedPoint,
    DataField_Sections,
    DataField_ProjectId,
    DataField_ProjectName,
    DataField_UserName,
    DataField_MachineName,
    DataField_CoordinateSystem,
    DataField_When,
    DataField_LayerId,
    DataField_StartTime,
    DataField_EndTime,
    DataField_GroupId,
    DataField_LowestId,
    DataField_HighestId,
	DataField_Source,
    DataField_PointType,
    DataField_LineType,
	DataField_LineString,
    DataField_PrimaryFaceId,
    DataField_AlternateFaces
};

static const char* DataFields[] =
{
	stringify(Empty),
	stringify(X),
	stringify(Y),
	stringify(Z),
	stringify(Id),
	stringify(Ids),
	stringify(Point),
	stringify(Points),
	stringify(NewPoint),
	stringify(Line),
	stringify(Line1),
	stringify(Line2),
	stringify(Lines),
	stringify(NewLine),
	stringify(NewLine1),
	stringify(NewLine2),
	stringify(Text),
	stringify(Length),
	stringify(Features),
	stringify(Result),
	stringify(Test),
	stringify(Offset),
	stringify(Face),
	stringify(OtherSide),
	stringify(Type),
	stringify(Radius),
	stringify(Direction),
	stringify(Direction1),
	stringify(Direction2),
	stringify(Edit),
	stringify(Distance),
	stringify(Distance1),
	stringify(Distance2),
	stringify(From),
	stringify(To),
	stringify(DirLine),
	stringify(DistLine),
	stringify(ForeignKey),
	stringify(Key),
	stringify(Arc),
	stringify(ClosingPoint),
	stringify(Topological),
	stringify(Left),
	stringify(PolygonX),
	stringify(PolygonY),
	stringify(PositionRatio),
	stringify(Center),
	stringify(CloseTo),
	stringify(SplitAfter),
	stringify(SplitAfter1),
	stringify(SplitAfter2),
	stringify(SplitBefore),
	stringify(SplitBefore1),
	stringify(SplitBefore2),
	stringify(Default),
	stringify(From1),
	stringify(From2),
	stringify(RefLine),
	stringify(ReverseArc),
	stringify(Term1),
	stringify(Term2),
	stringify(DeactivatedLabel),
	stringify(End),
	stringify(Entity),
	stringify(EntryString),
	stringify(FirstArc),
	stringify(Flipped),
	stringify(Label),
	stringify(NewX),
	stringify(NewY),
	stringify(OldX),
	stringify(OldY),
	stringify(RevisedEdit),
	stringify(RevisedEdits),
	stringify(Value),
	stringify(Start),
	stringify(Table),
	stringify(Template),
	stringify(Width),
	stringify(Backsight),
	stringify(Base),
	stringify(Clockwise),
	stringify(Data),
	stringify(DefaultEntryUnit),
	stringify(Delete),
	stringify(Font),
	stringify(Height),
	stringify(OldPolygonX),
	stringify(OldPolygonY),
	stringify(Rotation),
	stringify(EntryFromEnd),
	stringify(ExtendFromEnd),
	stringify(Fixed),
	stringify(Unit),
	stringify(UpdatedPoint),
	stringify(Sections),
	stringify(ProjectId),
	stringify(ProjectName),
	stringify(UserName),
	stringify(MachineName),
	stringify(CoordinateSystem),
	stringify(When),
	stringify(LayerId),
	stringify(StartTime),
	stringify(EndTime),
	stringify(GroupId),
	stringify(LowestId),
	stringify(HighestId),
	stringify(Source),
    stringify(PointType),
    stringify(LineType),
	stringify(LineString),
    stringify(PrimaryFaceId),
    stringify(AlternateFaces)
};
